﻿using Microsoft.CodeAnalysis.CSharp.Syntax;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using UMLSynthesizer.LangAnalyzer.Elements;

namespace UMLSynthesizer.CSharpAnalyzer.Elements
{
    class CSharpFieldVariableElement : CSharpVariableBase
    {
        #region Constructor

        public CSharpFieldVariableElement(VariableDeclaratorSyntax elementNode, CSharpFieldElement parentField)
            : base(elementNode, parentField)
        { }

        #endregion

        #region Properties

        public override string Identifier { get { return (elementNode as VariableDeclaratorSyntax).Identifier.ToString(); } }
        public override ElementKinds Kind { get { return ElementKinds.FieldVariable; } }

        public override ITypeBase Type { get { return (ParentElement as CSharpFieldElement).Type; } }

        public override bool IsAbstract { get { return (ParentElement as CSharpFieldElement).IsAbstract; } }
        public override bool IsStatic { get { return (ParentElement as CSharpFieldElement).IsStatic; } }
        public override VisibilityStates Visibility { get { return (ParentElement as CSharpFieldElement).Visibility; } }

        #endregion
    }
}
